﻿using System;

namespace ContactCenter.Core.DomainModel
{

    /// <summary>
    /// Value object for a customer's credit card.
    /// </summary>
    public class CreditCard : ValueObject<CreditCard>
    {
        protected CreditCard()
        {
        }

        public CreditCard(string publicPart, string privatePart, DateTime expirationDate)
        {
            PublicPart = publicPart;
            PrivatePart = privatePart;
            ExpirationDate = expirationDate;
            
            RegisterProperty(val => val.PublicPart);
            RegisterProperty(val => val.PrivatePart);
            RegisterProperty(val => val.ExpirationDate);
        }

        public string PublicPart { get; private set; }
        public string PrivatePart { get; private set; }
        public DateTime ExpirationDate { get; private set; }
    }
}
